<template>
  <div class="container">
    <div class="apply-container">
      <div class="apply-container-head"></div>
      <div class="apply-container-body">
        <div class="apply-container-body-title">
          <div class="apply-container-body-title-font">报账详情</div>
          <div class="apply-container-body-title-return">
            <el-button size="small" @click="goBackPage">返回</el-button>
          </div>
        </div>
        <el-divider class="apply-container-body-title-line"></el-divider>
        <div class="apply-container-body-content">
          <el-form :model="BillOrder" label-width="125px" label-position="LabelPosition" style="width: 100%;">

            <el-form-item label="姓名:" prop="InputUserName" style="width: 40%;">
              <el-input v-model="BillOrder.userName" placeholder="请输入姓名" :disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="工号:" prop="InputUserId" style="width: 40%;">
              <el-input v-model="BillOrder.userId" placeholder="请输入工号" :disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="申请人电话:" prop="InputUserPhone" style="width: 40%;">
              <el-input v-model="BillOrder.userPhone" placeholder="请输入申请人电话" :disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="报账车辆车牌号:" prop="InputAutoPlateNum" style="width: 40%;">
              <el-input v-model="BillOrder.autoPlateNum" placeholder="请输入报账车辆车牌号" :disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="报账类型:" prop="InputBillType" style="width: 40%;">
              <el-input v-model="BillOrder.billType" placeholder="请输入报账类型" :disabled="true"></el-input>
            </el-form-item>

            <el-form-item label="具体描述:" prop="InputBillDescribe" style="width: 50%;">
              <el-input v-model="BillOrder.billDescribe" type="textarea" placeholder="请输入具体描述" :disabled="true"
                maxlength="100" show-word-limit></el-input>
            </el-form-item>
            <el-form-item label="费用合计:" prop="InputBillTotal" style="width: 40%;">
              <el-input v-model="BillOrder.billTotal" placeholder="请输入费用合计" :disabled="true"></el-input>
            </el-form-item>


          </el-form>
        </div>
      </div>
      <div class="apply-container-footer"></div>
    </div>
  </div>
</template>
  
<script>
import { getBillById } from '@/api/bill'
export default {
  name: 'BillDetail',
  data() {
    return {
      LabelPosition: 'right',
      BillOrder: {
        userName: null,
        userId: null,
        userPhone: null,
        autoPlateNum: null,
        billType: null,
        billDescribe: null,
        billTotal: null,
        billReceipt: null,
        billId: null
      },


    }
  },

  methods: {
    initFormData() {
      this.BillOrder.billId = this.$route.query.BillId;
      getBillById(this.BillOrder.billId).then(res => {
        this.BillOrder = res.data.data
      })
    },

    BillReceiptGetUrl(response) {
      this.BillOrder.BillReceipt = response;
    },
    goBackPage() {
      this.$router.go(-1)
    },
  },

  created() {
    this.initFormData();
  },
}
</script>
  
<style scoped>
.container {
  height: 96%;
  width: 95%;
  margin: 0 auto;
  margin-top: 1%;
  background-color: #ffffff;
}

.apply-container {
  width: 90%;
  height: 100%;
  margin: 0 auto;
}

.apply-container-head {
  width: 95%;
  height: 30px;
  margin: 0 auto;
}

.apply-container-body {
  width: 95%;
  height: 92%;
  margin: 0 auto;
  background-color: #ffffff;

}

.apply-container-body-title {
  width: 98%;
  height: 5%;
  margin: 0 auto;
  display: flex;
}

.apply-container-body-title-return {
  width: 100%;
  padding-top: 5px;
  display: flex;
  justify-content: flex-end;
}

.apply-container-body-title-line {
  height: 1px;
  width: 98%;
  margin: 5px auto;
}

.apply-container-body-title-font {
  width: 100%;
  height: 99%;
  font-size: 18px;
  font-weight: bold;
  text-align: left;
  padding-top: 10px;
}

.apply-container-body-content {
  width: 85%;
  height: 100%;
  margin: 20px auto;
  display: flex;

}

.apply-container-body-content-submit {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.apply-container-footer {
  width: 95%;
  height: 10px;
  margin: 0 auto;
}
</style>